<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title><?= $site_title ?></title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="keywords" content="<?= $keywords ?>"/>
		<meta name="description" content="<?= $meta_desc ?>"/>
		<meta name="robots" content="ALL, INDEX, FOLLOW"/>
		
		<link rel="stylesheet" type="text/css" href="<?= base_url() ?>styles/bootstrap/css/bootstrap.min.css"/>
		<link rel="stylesheet" type="text/css" href="<?= base_url() ?>styles/sunrise/css/jquery-calendar.css"/>
		<link rel="stylesheet" type="text/css" href="<?= base_url() ?>styles/sunrise/css/styles.css"/>
		<link rel="stylesheet" type="text/css" href="<?= base_url() ?>styles/sunrise/css/style.css"/>
		<link rel="stylesheet" type="text/css" href="<?= base_url() ?>styles/sunrise/css/jquery.lightbox-0.5.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="<?= base_url() ?>styles/sunrise/css/ddsmoothmenu.css"/>
		<link rel="stylesheet" type="text/css" href="<?= base_url() ?>styles/sunrise/css/pagination.css"/>
		<script language="javascript" type="text/javascript" src="<?= base_url() ?>styles/sunrise/js/jquery-1.3.1.min.js"></script>
		<script language="javascript" type="text/javascript" src="<?= base_url() ?>styles/sunrise/js/jquery_cookie.js"></script>
		<script language="javascript" type="text/javascript" src="<?= base_url() ?>styles/sunrise/js/ddsmoothmenu.js"></script>
		<script language="javascript" type="text/javascript" src="<?= base_url() ?>styles/sunrise/js/ieupdate.js"></script>
		<script language="javascript" type="text/javascript" src="<?= base_url() ?>styles/sunrise/js/global.js"></script>
		<script language="javascript" type="text/javascript" src="<?= base_url() ?>styles/sunrise/js/startup.js"></script>
	</head>
	<body>
		<div id="fb-root"></div>
		<script>(function(d, s, id) {
			var js, fjs = d.getElementsByTagName(s)[0];
			if (d.getElementById(id)) return;
			js = d.createElement(s); js.id = id;
			js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1&appId=<?php echo $fb_app_id ?>";
			fjs.parentNode.insertBefore(js, fjs);
		}(document, 'script', 'facebook-jssdk'));</script>
		<a name="top">
		</a>
		<div id="wrap">
			<!--Begin Header-->
			<div id="header">
				<div id="banner">
					<div id="logo">
						<a href="<?= $logo->link ?>"<?= $logo->target ?>>
							<img src="<?= image_url($logo->image) ?>" width="149" height="97"/>
						</a>
					</div>
					<div class="qctop">

						<a href="<?= $banner_top->link ?>"<?= $banner_top->target ?>>
							<img src="<?= image_url($banner_top->image) ?>" border="0" alt="Banner" width="728px" heigh ="90px"/>
						</a>
					</div>
				</div>
			</div>
			<!--End Header-->
			<? $this->load->view('sunrise/menu') ?>
			<div id="content-wrap">	
				<div id="main-content">
					<?
					if ($is_home)
						$this->load->view('sunrise/' . $temp);
					else {
						$this->load->view('sunrise/' . $temp);
						$this->load->view('sunrise/right');
					}
					?>
				</div>
			</div>
			<div class="clear">
			</div>
			<?
			$this->load->view('sunrise/footer')?>
		</div>
		<div id="divAdLeft" style="DISPLAY: none; POSITION: absolute; TOP: 0px">
				<?php
				if (isset($banner_bottom[0])) {
					$banner = $banner_bottom[0];
					?>
					<a title="" href="<?= $banner->link ?>"<?= $banner->target ?>>
						<img width="125px" border="0" alt="" src="<?= image_url($banner->image) ?>" />
					</a>
				<?php } ?>
			</div>


			<div id="divAdRight" style="DISPLAY: none; POSITION: absolute; TOP: 0px">
				<?php
				if (isset($banner_bottom[1])) {
					$banner = $banner_bottom[1];
					?>
					<a title="" href="<?= $banner->link ?>"<?= $banner->target ?>>
						<img width="125px" border="0" alt="" src="<?= image_url($banner->image) ?>" />
					</a>
				<?php } ?>
			</div>

			<script>
			function FloatTopDiv()
			{
				startLX = ((document.body.clientWidth -MainContentW)/2)-LeftBannerW-LeftAdjust , startLY = TopAdjust+80;
				startRX = ((document.body.clientWidth -MainContentW)/2)+MainContentW+RightAdjust , startRY = TopAdjust+80;
				var d = document;
				function ml(id)
				{
					var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
					el.sP=function(x,y){this.style.left=x + 'px';this.style.top=y + 'px';};
					el.x = startRX;
					el.y = startRY;
					return el;
				}
				function m2(id)
				{
					var e2=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
					e2.sP=function(x,y){this.style.left=x + 'px';this.style.top=y + 'px';};
					e2.x = startLX;
					e2.y = startLY;
					return e2;
				}
				window.stayTopLeft=function()
				{
					if (document.documentElement && document.documentElement.scrollTop)
						var pY =  document.documentElement.scrollTop;
					else if (document.body)
						var pY =  document.body.scrollTop;
					if (document.body.scrollTop > 30){startLY = 3;startRY = 3;} else {startLY = TopAdjust;startRY = TopAdjust;};
					ftlObj.y += (pY+startRY-ftlObj.y)/16;
					ftlObj.sP(ftlObj.x, ftlObj.y);
					ftlObj2.y += (pY+startLY-ftlObj2.y)/16;
					ftlObj2.sP(ftlObj2.x, ftlObj2.y);
					setTimeout("stayTopLeft()", 1);
				}
				ftlObj = ml("divAdRight");
				//stayTopLeft();
				ftlObj2 = m2("divAdLeft");
				stayTopLeft();
			}
			function ShowAdDiv()
			{
				var objAdDivRight = document.getElementById("divAdRight");
				var objAdDivLeft = document.getElementById("divAdLeft");       
				if (document.body.clientWidth < 1000)
				{
					objAdDivRight.style.display = "none";
					objAdDivLeft.style.display = "none";
				}
				else
				{
					objAdDivRight.style.display = "block";
					objAdDivLeft.style.display = "block";
					FloatTopDiv();
				}
			} 
			</script>
			<!-- Banner chay 2 ben -->
			<script>
			document.write("<script type='text/javascript' language='javascript'>MainContentW = 1000;LeftBannerW = 125;RightBannerW = 125;LeftAdjust = 5;RightAdjust = 5;TopAdjust = 10;ShowAdDiv();window.onresize=ShowAdDiv;;<\/script>");
			</script>
	</body>
</html>